<html>
<head><meta charset="utf-8"><title>Customizable Diagnostic Levels · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html">Customizable Diagnostic Levels</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="204911443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204911443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204911443">(Jul 24 2020 at 12:56)</a>:</h4>
<p>I'd like to add a way to opt out of individual diagnostics (since the "mismatched arg count" has a couple of false positives), and was thinking that we might want to have a more granular way to configure severity of diagnostics.</p>
<p>I see that the default CSS plugin allows configuring various lint levels, maybe we want to have the same? Perhaps not on a per-diagnostic level, but I think it would be nice to have individual opt-outs for things like missing match arms (which also occasionally gives false positives) and other diagnostics. Thoughts?</p>



<a name="204912502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204912502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204912502">(Jul 24 2020 at 13:06)</a>:</h4>
<p>If we don't want this, I'd just add a "Enable Experimental Diagnostics" toggle instead that turns off diagnostics with many false positives.</p>



<a name="204912643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204912643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204912643">(Jul 24 2020 at 13:08)</a>:</h4>
<p>Maybe "experimental" should include <code>MissingOkInTailExpr</code>, since that's just a limited mismatched types diagnostics and I've seen an issue about false positives for that one too</p>



<a name="204913635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204913635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204913635">(Jul 24 2020 at 13:18)</a>:</h4>
<p>I think we might want both -- I think a "enable experimental diagnostics" toggle would be a good idea so we can introduce more of them and not have people need to toggle each of them off separately, but also configuring specific diagnostics would be good (though long term that should happen through attributes)</p>



<a name="204913683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204913683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204913683">(Jul 24 2020 at 13:18)</a>:</h4>
<p>Attributes as in <code>#[attributes]</code>?</p>



<a name="204913697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204913697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204913697">(Jul 24 2020 at 13:18)</a>:</h4>
<p>maybe we could even have levels of experimental diagnostics, so we could have a super spammy level where we give a diagnostic for every type mismatch (though I might be the only person who enables that <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span> )</p>



<a name="204913702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204913702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204913702">(Jul 24 2020 at 13:18)</a>:</h4>
<p>yeah</p>



<a name="204913751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204913751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204913751">(Jul 24 2020 at 13:19)</a>:</h4>
<p>That sounds like a good fit for hints and warnings, but maybe not for error diagnostics</p>



<a name="204913766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204913766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204913766">(Jul 24 2020 at 13:19)</a>:</h4>
<p>hm that's true</p>



<a name="204913789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204913789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204913789">(Jul 24 2020 at 13:19)</a>:</h4>
<p>ok, long-term error diagnostics should be perfect anyway ;)</p>



<a name="204913845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204913845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204913845">(Jul 24 2020 at 13:20)</a>:</h4>
<p>heh, yeah</p>



<a name="204913881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204913881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204913881">(Jul 24 2020 at 13:20)</a>:</h4>
<p>so, a general toggle seems more important and useful to me right now</p>



<a name="204915023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204915023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204915023">(Jul 24 2020 at 13:30)</a>:</h4>
<p>OTOH maybe we <em>want</em> people to have to disable each diagnostic separately...</p>



<a name="204915144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204915144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204915144">(Jul 24 2020 at 13:31)</a>:</h4>
<p>I kinda do :)</p>



<a name="204915370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204915370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204915370">(Jul 24 2020 at 13:33)</a>:</h4>
<p>well... I kind of want to have a place for super-experimental diagnostics, and then have them graduate to a default-on state where people can still disable them. I think it's useful if you can add a diagnostic in a not-yet-ready-for-general-consumption state</p>



<a name="204915453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204915453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204915453">(Jul 24 2020 at 13:34)</a>:</h4>
<p>I guess that would be possible with specific toggles as well though</p>



<a name="204915506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204915506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204915506">(Jul 24 2020 at 13:34)</a>:</h4>
<p>soo yeah, maybe individual toggles are the better approach after all <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="204915527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204915527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204915527">(Jul 24 2020 at 13:35)</a>:</h4>
<p>If we change the default setting, will that update within VS Code or will the old default be kept?</p>



<a name="204915712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204915712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204915712">(Jul 24 2020 at 13:36)</a>:</h4>
<p>I <em>think</em> we can implement defaults on server side that apply if the setting hasn't been explicitly set by the user?</p>



<a name="204915796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204915796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204915796">(Jul 24 2020 at 13:37)</a>:</h4>
<p>Oh, yeah, we already have that</p>



<a name="204915825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204915825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204915825">(Jul 24 2020 at 13:37)</a>:</h4>
<p>But the plugin-side also has defaults, maybe they're optional though</p>



<a name="204916078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204916078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204916078">(Jul 24 2020 at 13:40)</a>:</h4>
<p>yeah I don't know how those work</p>



<a name="204916394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204916394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204916394">(Jul 24 2020 at 13:43)</a>:</h4>
<p>In the stupidest way possible</p>



<a name="204916431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204916431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204916431">(Jul 24 2020 at 13:43)</a>:</h4>
<p>Even if the user has nothing in their settings, VS Code will gladly stomp over every server default</p>



<a name="204916440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204916440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204916440">(Jul 24 2020 at 13:43)</a>:</h4>
<p>hrm</p>



<a name="204916447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204916447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204916447">(Jul 24 2020 at 13:43)</a>:</h4>
<p>But I don't think unsynced defaults are a big problem</p>



<a name="204916506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204916506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204916506">(Jul 24 2020 at 13:44)</a>:</h4>
<p>well, actually the Emacs impl will kind of do the same</p>



<a name="204916513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204916513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204916513">(Jul 24 2020 at 13:44)</a>:</h4>
<p>Like, they'll converge eventually</p>



<a name="204916577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204916577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204916577">(Jul 24 2020 at 13:44)</a>:</h4>
<p>maybe we want to model this as two settings "disabled diagnostics" and "enabled experimental diagnostics" that are just lists of strings anyway?</p>



<a name="204916760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204916760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204916760">(Jul 24 2020 at 13:46)</a>:</h4>
<p>Yeah, this seems like the best solution</p>



<a name="204916797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204916797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204916797">(Jul 24 2020 at 13:46)</a>:</h4>
<p>Well, impl-wise, for every diagnostic we should have either "on" or "off", without distinguishing experimental from non-experimental ones</p>



<a name="204916813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204916813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204916813">(Jul 24 2020 at 13:47)</a>:</h4>
<p>but two lists in the UI seem good!</p>



<a name="204916837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204916837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204916837">(Jul 24 2020 at 13:47)</a>:</h4>
<p>yeah</p>



<a name="204922641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204922641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204922641">(Jul 24 2020 at 14:32)</a>:</h4>
<p>Hmm, can we accept an arbitrary string-keyed map as a setting? Then each diagnostic can be mapped to a severity instead of just turned on or off.</p>



<a name="204922721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204922721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204922721">(Jul 24 2020 at 14:33)</a>:</h4>
<p>Like, having a general type mismatch diagnostic that emits errors would be too noisy, but not necessarily if it's only at hint level</p>



<a name="204922766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204922766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204922766">(Jul 24 2020 at 14:33)</a>:</h4>
<p>And when users turn it off completely, they miss out on quick fixes</p>



<a name="204923469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204923469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204923469">(Jul 24 2020 at 14:38)</a>:</h4>
<p>initialization options are <code>any</code>, so... I guess?</p>



<a name="204923513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204923513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204923513">(Jul 24 2020 at 14:38)</a>:</h4>
<p>that would also make it just one map instead of two lists, which is nice</p>



<a name="204923577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204923577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204923577">(Jul 24 2020 at 14:39)</a>:</h4>
<p>well, I guess it's possible that VSCode doesn't allow arbitrary JSON as settings, I can't speak to that</p>



<a name="204923578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204923578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204923578">(Jul 24 2020 at 14:39)</a>:</h4>
<p>Yup, map would be fien</p>



<a name="204924028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204924028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204924028">(Jul 24 2020 at 14:42)</a>:</h4>
<p>Can you provide custom settings UI or would this just be a JSON entry box for users? :D</p>



<a name="204924282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204924282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204924282">(Jul 24 2020 at 14:44)</a>:</h4>
<p>I think it'll be JSON</p>



<a name="204924288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204924288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204924288">(Jul 24 2020 at 14:44)</a>:</h4>
<p>Seems fine by me</p>



<a name="204924333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204924333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204924333">(Jul 24 2020 at 14:44)</a>:</h4>
<p>we are not going to have many false positives, are we? :D</p>



<a name="204924537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204924537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204924537">(Jul 24 2020 at 14:46)</a>:</h4>
<p>I meant this to also be the way to configure warnings and hints, and for those a nicer UI would be good</p>



<a name="204925748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204925748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204925748">(Jul 24 2020 at 14:55)</a>:</h4>
<p>Clearly <code>package.json</code> needs to be produced by xtask</p>



<a name="204930237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204930237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204930237">(Jul 24 2020 at 15:29)</a>:</h4>
<p>I'll just go with the experimental diagnostics checkbox for now. Is there a way to invalidate existing diagnostics when the box is (un)checked?</p>



<a name="204930576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204930576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204930576">(Jul 24 2020 at 15:32)</a>:</h4>
<p><span class="user-mention" data-user-id="211727">@Jonas Schievink</span> <code>sudo reboot</code>? I'd punt on this for the time being</p>



<a name="204930758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Customizable%20Diagnostic%20Levels/near/204930758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Customizable.20Diagnostic.20Levels.html#204930758">(Jul 24 2020 at 15:33)</a>:</h4>
<p>I could maybe add it to <code>requiresReloadOpts</code></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>